<h1>Listing User</h1>

<%= link_to 'new', new_user_path %>

<table>
  <tr>
    <th>id</th>
    <th>username</th>
    <th>email</th>
    <th>show</th>
    <th>edit</th>
    <th>destroy</th>

  </tr>

  <% @users.each do |user| %>
    <tr>
        <td><%= user.id %></td>
        <td><%= user.username %></td>
        <td><%= user.email %></td>
        <td><%= link_to 'show', user_path(user) %></td>
        <td><%= link_to 'edit', edit_user_path(user) %></td>
        <td><%= link_to 'destroy', user_path(user), method: :delete, data: {confirm: 'Are you sure?'} %></td>
    </tr>
  <% end %>

</table>


